﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ViewQuestionDetails.aspx.vb" Inherits="TechJunkieProj.ViewQuestionDetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        &nbsp;</p>
    <link href='http://fonts.googleapis.com/css?family=Kaushan+Script|UnifrakturMaguntia|Satisfy' rel='stylesheet' type='text/css'>&nbsp;
       
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<h1 class= "PageTitle">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>Answers</u></h1>
    <p>
        <br />
        <br />
        <br />
    </p>
      <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
        <AlternatingItemTemplate>
            <span style="">
            <asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' CssClass = 'HighLight'></asp:Label>
            <br />
            <b>Author:</b>
            <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
            <br />
            <b>DateUpdated:</b>
            <asp:Label ID="DateUpdatedLabel" runat="server" 
                Text='<%# Eval("DateUpdated") %>' />
            <br />
            <br />
            </span>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <span style="">Question:
            <asp:TextBox ID="QuestionTextBox" runat="server" 
                Text='<%# Bind("Question") %>' />
            <br />
            Author:
            <asp:TextBox ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' />
            <br />
            DateUpdated:
            <asp:TextBox ID="DateUpdatedTextBox" runat="server" 
                Text='<%# Bind("DateUpdated") %>' />
            <br />
            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                Text="Update" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                Text="Cancel" />
            <br /><br /></span>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <span>No data was returned.</span>
        </EmptyDataTemplate>
        <InsertItemTemplate>
            <span style="">Question:
            <asp:TextBox ID="QuestionTextBox" runat="server" 
                Text='<%# Bind("Question") %>' />
            <br />Author:
            <asp:TextBox ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' />
            <br />DateUpdated:
            <asp:TextBox ID="DateUpdatedTextBox" runat="server" 
                Text='<%# Bind("DateUpdated") %>' />
            <br />
            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                Text="Insert" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                Text="Clear" />
            <br /><br /></span>
        </InsertItemTemplate>
        <ItemTemplate>
            <span style="">
            <asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' CssClass = 'HighLight'></asp:Label>
            <br />
            <b>Author:</b>
            <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
            <br />
            <b>DateUpdated:</b>
            <asp:Label ID="DateUpdatedLabel" runat="server" 
                Text='<%# Eval("DateUpdated") %>' />
            <br />
            <br />
            </span>
        </ItemTemplate>
        <LayoutTemplate>
            <div ID="itemPlaceholderContainer" runat="server" style="">
                <span runat="server" id="itemPlaceholder" />
            </div>
            <div style="">
            </div>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <span style="">Question:
            <asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' />
            <br />
            Author:
            <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
            <br />
            DateUpdated:
            <asp:Label ID="DateUpdatedLabel" runat="server" 
                Text='<%# Eval("DateUpdated") %>' />
            <br />
<br /></span>
        </SelectedItemTemplate>
    </asp:ListView>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionStringList %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionStringList.ProviderName %>" 
            SelectCommand="SELECT [Question], [Author], [DateUpdated] FROM [Question] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p style="font-family: cursive; font-size: x-large; text-decoration: underline; font-weight: bolder; font-style: normal; font-variant: normal; color: #0033CC; border: medium double #C0C0C0">
        Answers</p>
    <asp:Panel ID="Panel2" runat="server" BorderStyle="Solid">
    <asp:ListView ID="ListView2" runat="server" DataSourceID="SqlDataSource2">
         <AlternatingItemTemplate>
             <span style="">
             <asp:Label ID="CommentsLabel" runat="server" Text='<%# Eval("Comments") %>' CssClass="CommentsStyle"></asp:Label>
             <br />
             <b>Author:</b>
             <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
             <br />
             <b>DateUpdated:</b>
             <asp:Label ID="DateUpdatedLabel" runat="server" 
                 Text='<%# Eval("DateUpdated") %>' />
             <br />
             <br />
             <hr />
             </span>
         </AlternatingItemTemplate>
         <EditItemTemplate>
             <span style="">Comments:
             <asp:TextBox ID="CommentsTextBox" runat="server" 
                 Text='<%# Bind("Comments") %>' />
             <br />
             Author:
             <asp:TextBox ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' />
             <br />
             DateUpdated:
             <asp:TextBox ID="DateUpdatedTextBox" runat="server" 
                 Text='<%# Bind("DateUpdated") %>' />
             <br />
             <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                 Text="Update" />
             <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                 Text="Cancel" />
             <br /><br /></span>
         </EditItemTemplate>
         <EmptyDataTemplate>
             <span>No Answers Found.</span>
         </EmptyDataTemplate>
         <InsertItemTemplate>
             <span style="">Comments:
             <asp:TextBox ID="CommentsTextBox" runat="server" 
                 Text='<%# Bind("Comments") %>' />
             <br />Author:
             <asp:TextBox ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' />
             <br />DateUpdated:
             <asp:TextBox ID="DateUpdatedTextBox" runat="server" 
                 Text='<%# Bind("DateUpdated") %>' />
             <br />
             <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                 Text="Insert" />
             <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                 Text="Clear" />
             <br /><br /></span>
         </InsertItemTemplate>
         <ItemTemplate>
             <span style="">
             <asp:Label ID="CommentsLabel" runat="server" Text='<%# Eval("Comments") %>' CssClass="CommentsStyle"></asp:Label>
             <br />
             <b>Author:</b>
             <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
             <br />
             <b>DateUpdated:</b>
             <asp:Label ID="DateUpdatedLabel" runat="server" 
                 Text='<%# Eval("DateUpdated") %>' />
             <br />
             <br />
             <hr />
             </span>
         </ItemTemplate>
         <LayoutTemplate>
             <div ID="itemPlaceholderContainer" runat="server" style="">
                 <span runat="server" id="itemPlaceholder" />
             </div>
             <div style="">
                 <asp:DataPager ID="DataPager1" runat="server">
                     <Fields>
                         <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                             ShowLastPageButton="True" />
                     </Fields>
                 </asp:DataPager>
             </div>
         </LayoutTemplate>
         <SelectedItemTemplate>
             <span style="">Comments:
             <asp:Label ID="CommentsLabel" runat="server" Text='<%# Eval("Comments") %>' />
             <br />
             Author:
             <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
             <br />
             DateUpdated:
             <asp:Label ID="DateUpdatedLabel" runat="server" 
                 Text='<%# Eval("DateUpdated") %>' />
             <br />
<br /></span>
         </SelectedItemTemplate>
    </asp:ListView>
    </asp:Panel>
     
    <p>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionStringList %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionStringList.ProviderName %>" 
            SelectCommand="SELECT [Comments], [Author], [DateUpdated] FROM [Question_Comments] WHERE ([Q_FKID] = ?) ORDER BY [ID] DESC">
            <SelectParameters>
                <asp:QueryStringParameter Name="Q_FKID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    
    <p style="font-family: cursive; font-size: x-large; text-decoration: underline; font-weight: bolder; font-style: normal; font-variant: normal; color: #0033CC; border: medium double #C0C0C0">
        Answers This Question</p>
    <p>
        &nbsp;<asp:Panel ID="Pnl_Answer" runat="server" BorderStyle="Solid" Height="319px" 
        Width="808px" BackColor="Silver">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <br />
        Answer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
        <br />
&nbsp;<asp:TextBox ID="Tb_Answer" runat="server" BorderStyle="Solid" Height="139px" 
            TextMode="MultiLine" Width="753px"></asp:TextBox>
        <br />
        <br />
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Btn_Submit" runat="server" Text="Submit" Width="125px" />
        <br />
        <br />
        <br />
        &nbsp;&nbsp;
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
    </asp:Panel>
    </p>
    <asp:Panel ID="Panel1" runat="server">
    </asp:Panel>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
